import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '用户id',
    align:"center",
    dataIndex: 'userId'
   },
   {
    title: '设备id',
    align:"center",
    dataIndex: 'deviceId'
   },
   {
    title: '版本号',
    align:"center",
    dataIndex: 'versionCode'
   },
   {
    title: '网络型号',
    align:"center",
    dataIndex: 'networkType'
   },
   {
    title: 'cpu型号',
    align:"center",
    dataIndex: 'cpuAbi'
   },
   {
    title: '系统版本',
    align:"center",
    dataIndex: 'systemVersion'
   },
   {
    title: '手机型号',
    align:"center",
    dataIndex: 'manufacturer'
   },
   {
    title: '安卓id',
    align:"center",
    dataIndex: 'androidId'
   },
   {
    title: 'oaId',
    align:"center",
    dataIndex: 'oaId'
   },
   {
    title: 'imei',
    align:"center",
    dataIndex: 'imei'
   },
   {
    title: 'VPN连接状态',
    align:"center",
    dataIndex: 'vpnStatus'
   },
   {
    title: 'USB状态',
    align:"center",
    dataIndex: 'usbStatus'
   },
   {
    title: 'USB配置模式',
    align:"center",
    dataIndex: 'usbConfig'
   },
   {
    title: 'ADB调试是否开启',
    align:"center",
    dataIndex: 'adbStatus'
   },
   {
    title: 'SIM卡状态',
    align:"center",
    dataIndex: 'simStatus'
   },
   {
    title: 'launcher',
    align:"center",
    dataIndex: 'launcher'
   },
   {
    title: '是否模拟器',
    align:"center",
    dataIndex: 'simulator'
   },
   {
    title: '电池电量',
    align:"center",
    dataIndex: 'batteryLevel'
   },
   {
    title: '是否运行在多开/分身环境中',
    align:"center",
    dataIndex: 'runningInVirtualSpace'
   },
   {
    title: '是否脚本',
    align:"center",
    dataIndex: 'script'
   },
   {
    title: '设备存储容量',
    align:"center",
    dataIndex: 'capacitySize'
   },
   {
    title: '设备可用存储容量',
    align:"center",
    dataIndex: 'freeSpace'
   },
   {
    title: '设备存储数量',
    align:"center",
    dataIndex: 'capacityNum'
   },
   {
    title: '请求路径',
    align:"center",
    dataIndex: 'requestUrl'
   },
   {
    title: 'ip',
    align: 'center',
    dataIndex: 'ip',
   },
   {
    title: '记录时间',
    align:"center",
    dataIndex: 'createTime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户id',
    field: 'userId',
    component: 'Input',
  },
  {
    label: '设备id',
    field: 'deviceId',
    component: 'Input',
  },
  {
    label: '版本号',
    field: 'versionCode',
    component: 'Input',
  },
  {
    label: '网络型号',
    field: 'networkType',
    component: 'Input',
  },
  {
    label: 'cpu型号',
    field: 'cpuAbi',
    component: 'Input',
  },
  {
    label: '系统版本',
    field: 'systemVersion',
    component: 'Input',
  },
  {
    label: '手机型号',
    field: 'manufacturer',
    component: 'Input',
  },
  {
    label: '安卓id',
    field: 'androidId',
    component: 'Input',
  },
  {
    label: 'oaId',
    field: 'oaId',
    component: 'Input',
  },
  {
    label: 'imei',
    field: 'imei',
    component: 'Input',
  },
  {
    label: 'VPN连接状态',
    field: 'vpnStatus',
    component: 'Input',
  },
  {
    label: 'USB状态',
    field: 'usbStatus',
    component: 'Input',
  },
  {
    label: 'USB配置模式',
    field: 'usbConfig',
    component: 'Input',
  },
  {
    label: 'ADB调试是否开启',
    field: 'adbStatus',
    component: 'Input',
  },
  {
    label: 'SIM卡状态',
    field: 'simStatus',
    component: 'Input',
  },
  {
    label: 'launcher',
    field: 'launcher',
    component: 'Input',
  },
  {
    label: '是否模拟器',
    field: 'simulator',
    component: 'Input',
  },
  {
    label: '电池电量',
    field: 'batteryLevel',
    component: 'InputNumber',
  },
  {
    label: '是否运行在多开/分身环境中',
    field: 'runningInVirtualSpace',
    component: 'Input',
  },
  {
    label: '是否脚本',
    field: 'script',
    component: 'Input',
  },
  {
    label: '设备存储容量',
    field: 'capacitySize',
    component: 'InputNumber',
  },
  {
    label: '设备可用存储容量',
    field: 'freeSpace',
    component: 'InputNumber',
  },
  {
    label: '设备存储数量',
    field: 'capacityNum',
    component: 'InputNumber',
  },
  {
    label: '请求路径',
    field: 'requestUrl',
    component: 'Input',
  },
  {
    label: 'Model',
    field: 'model',
    component: 'Input',
  },
  {
    label: 'Ip',
    field: 'ip',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  userId: {title: '用户id',order: 0,view: 'text', type: 'string',},
  deviceId: {title: '设备id',order: 1,view: 'text', type: 'string',},
  versionCode: {title: '版本号',order: 2,view: 'text', type: 'string',},
  networkType: {title: '网络型号',order: 3,view: 'text', type: 'string',},
  cpuAbi: {title: 'cpu型号',order: 4,view: 'text', type: 'string',},
  systemVersion: {title: '系统版本',order: 5,view: 'text', type: 'string',},
  manufacturer: {title: '手机型号',order: 6,view: 'text', type: 'string',},
  androidId: {title: '安卓id',order: 7,view: 'text', type: 'string',},
  oaId: {title: 'oaId',order: 8,view: 'text', type: 'string',},
  imei: {title: 'imei',order: 9,view: 'text', type: 'string',},
  vpnStatus: {title: 'VPN连接状态',order: 10,view: 'text', type: 'string',},
  usbStatus: {title: 'USB状态',order: 11,view: 'text', type: 'string',},
  usbConfig: {title: 'USB配置模式',order: 12,view: 'text', type: 'string',},
  adbStatus: {title: 'ADB调试是否开启',order: 13,view: 'text', type: 'string',},
  simStatus: {title: 'SIM卡状态',order: 14,view: 'text', type: 'string',},
  launcher: {title: 'launcher',order: 15,view: 'text', type: 'string',},
  simulator: {title: '是否模拟器',order: 16,view: 'text', type: 'string',},
  batteryLevel: {title: '电池电量',order: 17,view: 'number', type: 'number',},
  runningInVirtualSpace: {title: '是否运行在多开/分身环境中',order: 18,view: 'text', type: 'string',},
  script: {title: '是否脚本',order: 19,view: 'text', type: 'string',},
  capacitySize: {title: '设备存储容量',order: 20,view: 'number', type: 'number',},
  freeSpace: {title: '设备可用存储容量',order: 21,view: 'number', type: 'number',},
  capacityNum: {title: '设备存储数量',order: 22,view: 'number', type: 'number',},
  requestUrl: {title: '请求路径',order: 23,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}